home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12473 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: inforamp.net!ts13-11
  2. From: rmorin@inforamp.net (Randy Charles Morin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Coding Standards
  5. Date: Wed, 20 Mar 96 04:45:40 GMT
  6. Organization: MiddleWorld SoftWare
  7. Message-ID: <4io2i7$n9v@sam.inforamp.net>
  8. References: <4hj8ek$elu@sam.inforamp.net> <4hktar$5o2@galaxy.ucr.edu> <4hmqol$97j@abacus.abasoft.co.uk> <4hsg8r$pmm@sam.inforamp.net> <4i9o6j$p4l@daisy.pgh.wec.com> <4idskb$pc1@sam.inforamp.net> <314EBD08.43BC@virtus.com>
  9. NNTP-Posting-Host: ts34-09.tor.inforamp.net
  10. X-Newsreader: News Xpress Version 1.0 Beta #4
  11.  
  12. In article <314EBD08.43BC@virtus.com>,
  13.    "Richard F. Albury" <richard.albury@virtus.com> wrote:
  14. >// is the standard C++ comment, so I'm not sure I understand your objection.
  15.  
  16. What I meant was that the /* */ has been the only standard comment for years. 
  17.  The // comment style is a new proposed standard.
  18.  
  19. >>         -a class which can be instantiated with a "new" must have a copy
  20. >> constructor, a destructor and an assignment operator definition.
  21. >
  22. >It's good discipline.  Read Scott Meyers' books for more info.
  23.  
  24. Unfortunately, if we follow everybodies good discipline guidelines, we would 
  25. miss our October deadline by a few years.
  26.  
  27. >>         -optimize code only when you have a problem.
  28. >>         Why not anticipate the problem?
  29. >
  30. >You rarely can.  Read Plauger's writings on style.  One of his sayings is
  31. >"First make it right, then make it fast."  If performance is an issue, use a
  32. >profiler.
  33.  
  34. You are right.  But the standard explicitly stated that no optimization could 
  35. be done until there was a problem.  I'd hate to see that problem in the field. 
  36.  I'd rather anticipate the problem, most likely by doing exactly what you 
  37. suggested.
  38.  
  39. >>         -access functions are to be inline.
  40. >>         This is the biggest fallacy in programming today.  If you make your
  41. >> accessors inline, then you have defeated the purpose of data hiding.  If 
  42. >> your data's type changes, then you still have to recompile every object 
  43. >> that accesses the member.
  44. >
  45. >Agreed.
  46.  
  47. Thank you.  I have a hard time convincing anybody of this.
  48.  
  49. Agrivar
  50.